cd "F:\Dropbox\School\Research Projects\Populism\Articles\Populist Psychology\Submission files\JOP 2020\Final\Replication files"

use "study 1 prepped.dta", clear

gen pop = ant*ppl*man
gen pop2 = ant*ppl
sum pop
replace pop = (pop-r(min))/(r(max)-r(min))
sum pop2
replace pop2 = (pop2-r(min))/(r(max)-r(min))
reg pop i.treat
reg pop2 i.treat


use "study 2 prepped.dta", clear

gen pop = ant*man*ppl

sum pop
replace pop = (pop - r(min))/((r(max) - r(min)))

foreach var of varlist ant ppl man anger fear cultdisc idmarg econeval ideo imm {
qui sum `var'
replace `var' = (`var' - `r(min)') / (`r(max)'-`r(min)')
}

sureg (anger econeval female ed clase age ideo) (fear econeval female ed clase age ideo) /*
*/(cultdisc anger fear econeval female ed clase age ideo) (pop cultdisc anger fear econeval female ed clase age ideo)

